package cn.china.myspringboot.entity;

import com.alibaba.fastjson.JSONObject;

public class Result {

public static JSONObject success(JSONObject jsonObject){
    JSONObject object=new JSONObject();
    object.put("code",200);
    object.put("message","success");
    object.put("data",jsonObject);
    return  object;
}

    public static JSONObject error(JSONObject jsonObject){
        JSONObject object=new JSONObject();
        object.put("code",500);
        object.put("message","fail");
        object.put("data",jsonObject);
        return  object;
    }
}
